package com.yy.tkmybatis.controller;

import com.yy.tkmybatis.entity.ProductInfo;
import com.yy.tkmybatis.service.ProductInfoService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RestController
public class ProductInfoConroller {
    @Autowired
    private ProductInfoService productInfoService;
    @ApiOperation(value="获取商品信息列表")
    @RequestMapping(value = "/productInfo/list",method = RequestMethod.GET)
    public List<ProductInfo> getList(){
        List<ProductInfo> list = productInfoService.getList();
        return list;
    }
}
